home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1048 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  618 b 

  1. Path: magnus.acs.ohio-state.edu!csn!carbon!ouray!exli
  2. From: exli@ouray.cudenver.edu (ELLIE XIAO-YU LI)
  3. Newsgroups: comp.lang.c
  4. Subject: HELP NEEDED: What the hell is wrong with my program?
  5. Date: 11 Jan 1996 03:49:45 GMT
  6. Organization: University of Colorado at Denver
  7. Message-ID: <4d21cp$gh@carbon.cudenver.edu>
  8. NNTP-Posting-Host: ouray.cudenver.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. sorry guys.  in my previous post, the line:
  12.  
  13. ptr->name=(char *)malloc(strlen(str1));
  14.  
  15. should read like this:
  16.  
  17. ptr->name=(char *)malloc(strlen(str1)+1);
  18.  
  19. and so forth.
  20.  
  21. thanx for reminding me, peter.
  22.  
  23.  
  24.  
  25. Mitch
  26. exli@ouray.cudenver.edu
  27.